/*************************************************
* Title：
* Author：Opportunity 
* Describe：
* CreateTime：2020-04-04 17:12:10
* Version：1.0
* Modify Recorder：
*************************************************/

using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using UnityEngine;

namespace TinyToolKit.AssetLoad
{
    [Serializable]
    public class AssetBundleConfig
    {
        [SerializeField,XmlElement("ABList")]
        public List<ABBase> ABList = new List<ABBase>();
    }

    [Serializable]
    public class ABBase
    {
        [SerializeField,XmlAttribute("AssetName")]
        public string assetName;

        [SerializeField,XmlAttribute("ABName")]
        public string abName;

        [SerializeField,XmlAttribute("Crc")]
        public uint crc;

        [SerializeField,XmlAttribute("Path")]
        public string path;
        
        [SerializeField,XmlAttribute("Encrypt")] 
        public bool encrypt;

        [SerializeField,XmlElement("ABDependencies")]
        public List<string> abDependencies;

        public ABBase() { }

        public ABBase(string path,uint crc,string abName,string assetName,bool encrypt, List<string> abDependencies)
        {
            this.path = path;
            this.crc = crc;
            this.abName = abName;
            this.assetName = assetName;
            this.encrypt = encrypt;
            this.abDependencies = abDependencies;
        }
    }
}
